﻿namespace CIS.Common.Grpc
{
    public interface IGrpcClient
    {
        Task<bool> Start();
        //bool Connect(int port);
        //bool Connect(string ip,int port);
        //void DisConnect();
        //bool Register(string topic);
        //bool UnRegister(string topic);  
        Task SendAsync(GrpcMessage message);
        Task<GrpcMessage> RequestAsync(GrpcMessage message, int timeOut = 3000);
        Func<GrpcMessage, Task> OnDataRecivedAsync { get; set; }
        Func<GrpcMessage, Task<GrpcMessage>> OnRequestAsync { get; set; }
    }
}
